-
Notifications
You must be signed in to change notification settings - Fork 16.2k
Add SQLAlchemy dependency to Exasol provider (#59902) #59915
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
|
Congratulations on your first Pull Request and welcome to the Apache Airflow community! If you have any issues or are unsure about any anything please check our Contributors' Guide (https://github.com/apache/airflow/blob/main/contributing-docs/README.rst)
|
5315fe3 to
b2a36d9
Compare
sunank200
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should mark SQLAlchemy as optional dependency in Exasol pyproject as well
| :return: the extracted sqlalchemy.engine.URL object. | ||
| """ | ||
| if URL is None: | ||
| raise AirflowOptionalProviderFeatureException( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| raise AirflowOptionalProviderFeatureException( | |
| raise AirflowOptionalProviderFeatureException( | |
| "sqlalchemy is required for SQL filter clause generation. " | |
| "Install it with: pip install 'apache-airflow-providers-exasol[sqlalchemy]'" | |
| ) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In the case described above you need to add it as optional dependency in pyproject.toml as well.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@jscheffl I added a [project.optional-dependencies] section to the pyproject.toml. I greped around and found an example where this is used, so I think I got the format right.
@sunank200 Regarding the error message: I went ahead and left the error message as is for now. Since in this file sqlalchemy is being used to generate a DB connection URI. Mentioning 'SQL filter clauses' might be a little confusing.
b2a36d9 to
f4391e6
Compare
Co-authored-by: Jarek Potiuk <jarek@potiuk.com>
Add SQLAlchemy dependency to Exasol provider
closes: #59902
Summary
This PR makes sqlalchemy an optional dependency for the Exasol provider to support the upcoming Task SDK isolation in Airflow 3.0.